{% extends "base.html" %}
{% load nav_extras %}
{% block header%}
<script type="text/javascript">
    var myCalendar;
    function doOnLoad() {
        myCalendar = new dhtmlXCalendarObject([ "dt1", "dt2" ]);
        myCalendar.loadUserLanguage('cn');
    }
</script>
{% endblock%}
{% block content %}
<div class="panelBar">
  <ul class="toolBar">
    <li class="line">line</li>
    <li class=""><a class="add" href="/admin/holiday/create">添加</a></li>
    <li class="line">line</li>
  </ul>
</div>
<div class="searchBar">
  <form action="{{full_path}}" method="post">
    {% csrf_token %} 起始日期：<input type="text" id="dt1" name="dt1" value="{{dt1|date:'Y-m-d'}}" /> 终止日期：<input type="text" id="dt2"
      name="dt2" value="{{dt2|date:'Y-m-d'}}" /> <input type="submit" value="检索" />

  </form>
</div>
<div class="pageContent">
  <table class="dhtmlxGrid" gridHeight="auto" name="grid2" imgpath="/static/js/codebase/imgs/" width="98%" lightnavigation="true" >
      <tr>
        <td type="ro">ID</td>
        <td type="ro">开始时间</td>
        <td type="ro">结束时间</td>
        <td type="ro">描述</td>
        <td type="ro">操作</td>
      </tr>
      {%for holiday in list.object_list%}
      <tr>
        <td>{{holiday.id}}</td>
        <td>{{holiday.start_date|date:"Y-m-d"}}</td>
        <td>{{holiday.end_date|date:"Y-m-d"}}</td>
        <td>{{holiday.memo}}</td>
        <td><a href="/admin/holiday/delete/{{holiday.id}}" title="确定要删除吗?">删除</a></td>
      </tr>
      {%endfor%}
  </table>
</div>
  <div class="pagination">
  {% paging_nav nav_url pn pc %} 
  </div>
{% endblock %}
